<div class="IndexLoginWrap">
<{if $env.cookie.UNAME}>
<ul id="memberBar_<{$widgets_id}>">
  <li><{t app='b2c'}>欢迎您,<{/t}><span id="uname_<{$widgets_id}>"></span>！</li>
  <li class="buttonbar"><a href="<{link app=b2c ctl=site_member act=index}>"><{t app='b2c'}>[会员中心]<{/t}></a>|<a href="<{link app=b2c ctl=site_passport act=logout}>"><{t app='b2c'}>[退出]<{/t}></a></li>
</ul>
<script>
$("uname_<{$widgets_id}>").innerHTML = Cookie.read('UNAME');
</script>
<{else}>
<form action="<{link app=b2c ctl=site_passport act=verify}>" method="post" id="loginBar_<{$widgets_id}>" class='member-loginform'>
  <div class="inputarea">
    <label for="in_login"><{t app='b2c'}>用户名：<{/t}></label><input type="text" id="in_login" name="login" class="inputstyle userinput"/><br />
    <label for="in_passwd"><{t app='b2c'}>密&nbsp;&nbsp;&nbsp;码：<{/t}></label><input type="password" id="in_passwd" name="passwd" class="inputstyle userinput"/><br />
  <{if $data.valideCode}>
    <label for="in_vcode"><{t app='b2c'}>验证码：<{/t}></label><span id='verifyCodebox_<{$widgets_id}>'><{input style='width:40px;' class="inputstyle"  type="digits" required="true" name="loginverifycode" id="iptlogin"  tabindex="3"}><span class='verifyCode' style='display:none;'><img src="#" border="1" id="LoginimgVerifyCode_<{$widgets_id}>"/><br />
<a href="javascript:changeimg_<{$widgets_id}>()"><{t app='b2c'}>看不清楚?换个图片<{/t}></a>
               </span>
			   </span>

  <{/if}>
    <label>&nbsp;</label><input type="submit" id="btn_login" value="<{t app='b2c'}>登录<{/t}>"/><br>
  </div>
  <div class="buttonbar">
  	<{foreach from=$data.login_content item=login}>
	<{$login}>
	<{/foreach}>
    <div class="reg"><a href = "<{link app=b2c ctl=site_passport act=signup}>"><{t app='b2c'}>[免费注册]<{/t}></a>|<a href = "<{link app=b2c ctl=site_passport act='lost'}>"><{t app='b2c'}>忘记密码?<{/t}></a></div>
  </div>
  </form>
<{/if}>
</div>



<{if $data.valideCode}>
<script>
$$('#loginBar_<{$widgets_id}> input').addEvent('focus',function(){
      if($(this.form).retrieve('showvcode',false))return;
      $('verifyCodebox_<{$widgets_id}>').getElements('span').show();
      changeimg_<{$widgets_id}>();
      $(this.form).store('showvcode',true);
});
function changeimg_<{$widgets_id}>(){
    $('LoginimgVerifyCode_<{$widgets_id}>').set('src','<{link app=b2c ctl=site_passport act="verifyCode" arg0="l"}>?'+$time());
}
</script>
<{/if}>

